/*
 * Comp4081desktopApp.java
 */

package comp4081desktopapp;

import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;

/**
 * The main class of the application.
 */
public class Comp4081desktopApp extends SingleFrameApplication {
    public static int patientID, therapyID;
 /*   public Comp4081desktopApp(int p, int t)
    {
        patientID = p;
        therapyID = t;
    }*/
    /**
     * At startup create and show the main frame of the application.
     */
    @Override protected void startup() {
        
        //patientID=18;
        //therapyID=1;
        System.out.println("From startup" + patientID);
        Comp4081desktopView workGood = new Comp4081desktopView(this,patientID, therapyID);
        
        show(workGood);
        
    }

    /**
     * This method is to initialize the specified window by injecting resources.
     * Windows shown in our application come fully initialized from the GUI
     * builder, so this additional configuration is not needed.
     */
    @Override protected void configureWindow(java.awt.Window root) {
    }

    /**
     * A convenient static getter for the application instance.
     * @return the instance of Comp4081desktopApp
     */
    public static Comp4081desktopApp getApplication() {
        return Application.getInstance(Comp4081desktopApp.class);
    }

    /**
     * Main method launching the application.
     */
    public void main(String[] args,int p,int t) {
        patientID = p;
        therapyID = t;
        System.out.println("From main "+patientID);
        launch(Comp4081desktopApp.class, args);
        
    }
}
